<?php

class cException extends exception
{
	static private $aExceptionLog = array();

	public function __construct($sClassName, $sInfo, $iState)
	{
		$aParams = array($sClassName, $sInfo, $iState);
		// var_dump($aParams);
		self::$aExceptionLog[] = $aParams;
	}	

	/**
	 * 
	 */

	static public function getExceptionLog()
	{
		$sRet = '';
		foreach(self::$aExceptionLog as $aException)
		{
			list($sClassName, $sError, $iErrorState) = $aException;
	
			$aClassNames = array(

				STORK_STATE_ERROR => 'stork_error',
				STORK_STATE_INFO => 'stork_info',
				STORK_STATE_OK => 'stork_ok'

			);

			$sCssClassName = $aClassNames[$iErrorState];

			$sRet .=  '<p class="'.$sCssClassName.'">'.$sError.$sClassName.'</p>';
		}
		return $sRet;	
	}
}

?>
